class Player:
    def __init__(self):
        self.number_cooperators = 0
        self.round_earnings     = 0
        self.hunt_decisions     = [];

    def hunt_choices(self, round_number, current_food, current_reputation, m,
            player_reputations):

        self.hunt_decisions = [];
        total_players       = len(player_reputations) - 1
        hunted_all_rounds   = round_number*round_number

        for reputation in player_reputations:
            # player it most likely a slack every round, slack so not to help them.
            if round_number == reputation:
                self.slack()
            elif hunted_all_rounds == reputation:
                # player most likely hunt all algorithm, break even by hunting
                # and gain more reputation, making more unpredictable
                self.hunt() # break even, reputation gain
            else:
                # If previously more people cooperated then M and
                # i'm not in the negative, hunt, risk it
                if self.number_cooperators >= m and self.round_earnings > 0:
                    self.hunt()
                else: # in all other cases simply slack
                    self.slack()
        return self.hunt_decisions

    def hunt_outcomes(self, food_earnings):
        # Risk calculation variable
        self.round_earnings = sum(food_earnings)

    def round_end(self, award, m, number_cooperators):
        # Check how many people are cooperating, used for hunt choices
        self.number_cooperators = number_cooperators

    def hunt(self):
        self.hunt_decisions.append('h')

    def slack(self):
        self.hunt_decisions.append('s')

